<?php $atr=array(
					"name"=>"annex",
					"onsubmit"=>"return checkAnnex()"
				  ); 
echo form_open('annex',$atr); ?> 
  
<?php $bar="Annex List";?>
<table id="box-table-a" cellspacing="1" align="right" width="900px">
 	<tr><td colspan=7 align=right class=bar><?php echo $bar;?></td></tr>
   		<tr>
   			<th>Annex_ID</th>
   			<th>Contract_ID</th>
   			<th>Salary</th>   			  			
   			<th>AnnexDate</th>
   			<th>Action</th>
   		</tr> 		
 		
<?php if (isset($result)){?>
   	
   		<?php foreach ($result as $row):?> 
		<tr>
			<?php //$this->session->set_userdata('Customer_ID', $row->Customer_ID);?>			
			<td class="row1"><?php echo $row->Annex_ID; ?> </td>
			<td class="row1"><?php echo $row->Contract_ID ;?> </td>
			<td class="row1"><?php echo $row->Salary;?> </td>
			<td class="row1"><?php echo $row->AnnexDate;?> </td>
			<td class="row1" align="center">
				 <?php echo '<id=a>'.anchor("annex/edit/$row->Annex_ID",'<img src ="'.base_url().'templates/images/icons/edit.gif" title="Click here to modify"/>').'</a>';?>
				 <?php echo '<id=a  onclick="return checkLink();">'.anchor("annex/delete/$row->Annex_ID",'<img src ="'.base_url().'templates/images/icons/delete.png" title="Click here to delete"/>').'</a>';?> 
			</td>			
		</tr>	   
 		<?php endforeach; ?>				
   		<tr>   			
   			<td><input type="text" name ="Annex_ID" /></td>
   			<td><?php echo form_dropdown('Contract_ID', $contract, 'large');?>></td>
   			<td><input type= "text" name ="Salary" onkeyup="this.value=add_commas(this.value);"/></td>
   			<td><input type= "text" name ="AnnexDate" onkeyup="dtval(this,event)" maxlength="10"/></td>   		     			
   			<td align="center"><input type="submit" id="submit" value="insert"/> </td>
   		</tr>
   		<tr>
   			<td colspan="5">	<?php echo $this->pagination->create_links(); // tạo link phân trang?>  </td>
   		</tr>
   		<tr>
   			<td colspan="5" id="abc"> 
   				<?php if (isset($error)){
					echo "<br/>";   			
			   		echo $error;
					echo '<br/>';
					form_close();
		   		}?>
		   		
		   	 </td>
   		</tr>
		
 </table>
   				
      	
 <?php }?>


